<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/production/productioninventoryneed/Production_InventoryNeed.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/production/productioninventoryneed/Production_InventoryNeed.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '物料需求',
                name: 'productioninventoryneed/Production_InventoryNeed',
                url: "/Production_InventoryNeed/",
                sortName: "Id"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"MoCode":"","WoCode":""});
            const searchFormOptions = ref([[{"title":"订单号","field":"MoCode","type":"text"},{"title":"工单编码","field":"WoCode","type":"text"}]]);
            const columns = ref([{field:'Id',title:'主键',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'MoCode',title:'订单号',type:'string',width:110,require:true,align:'left',sort:true},
                       {field:'InvCode',title:'物料编码',type:'string',width:110,require:true,align:'left'},
                       {field:'InvName',title:'物料名称',type:'string',width:110,require:true,align:'left'},
                       {field:'InvStd',title:'物料规格',type:'string',width:110,require:true,align:'left'},
                       {field:'Qty',title:'需求数',type:'decimal',width:110,require:true,align:'left'},
                       {field:'CreateTime',title:'创建时间',type:'datetime',width:110,require:true,align:'left',sort:true},
                       {field:'CreateUserId',title:'创建人',type:'string',bind:{ key:'users',data:[]},width:110,align:'left'},
                       {field:'Status',title:'状态',type:'int',bind:{ key:'inStoreState',data:[]},width:80,align:'left'},
                       {field:'ParentInvCode',title:'上级物料编码',type:'string',width:120,align:'left'},
                       {field:'IType',title:'类型',type:'string',width:120,align:'left'},
                       {field:'WoCode',title:'工单编码',type:'string',width:220,align:'left'},
                       {field:'ProCode',title:'工序编码',type:'string',width:120,align:'left'},
                       {field:'Unit',title:'单位',type:'string',width:120,align:'left'},
                       {field:'WorkOrderList_Id',title:'任务单Id',type:'int',width:80,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
